<template>
  <view class="lesson-item" :class="className">
    <view class="item-rect">
      <image :src="itemInfo.cover || '/static/images/lesson1-1.jpg'" :mode="mode?mode:''"></image>
      <text>{{itemInfo.name}}</text>
      <text>{{itemInfo.description}}</text>
    </view>
  </view>
</template>

<script>
export default {
    props : ['itemInfo','url','mode','className'],
    data(){
        return {

        }
    }
}
</script>

<style>
.lesson-item .item-rect{
    background-color: #f5f5f5;
    border-radius: 8rpx;
    overflow: hidden;
}
.lesson-item text {
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    padding: 10rpx 15rpx;
    line-height: 1.6;
}
image {
    width: 100%;
}
</style>